home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / mach / !1Uad_special_ports.h next >
Text File  |  1992-07-29  |  2KB  |  67 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * Copyright (c) 1988 Carnegie-Mellon University
  5.  * Copyright (c) 1987 Carnegie-Mellon Univers!22 * All rights reserved.  The CMU software License Agreement specifies
  6.  * the terms and conditions for use and redistribution.
  7.  */
  8. /*
  9.  * HISTORY
  10.  * $Log:    thread_special_ports.h,v $
  11.  * Revision 2.5  89/06/27  00:25:37  rpd
  12.  *     Added thread_get_kernel_port, thread_set_kernel_port.
  13.  *     [89/06/27  00:03:21  rpd]
  14.  * 
  15.  * Revision 2.4  89/03/09  20:24:17  rpd
  16.  *     More cleanup.
  17.  * 
  18.  * Revision 2.3  89/02/25  18:41:23  gm0w
  19.  *     Changes for cleanup.
  20.  * 
  21.  * 17-Jan-88  David Golub (dbg) at Carnegie-Mellon University
  22.  *    Created.
  23.  *
  24.  */
  25. /*
  26.  *    File:    mach/thread_special_ports.h
  27.  *
  28.  *    Defines codes for special_purpose thread ports.  These are NOT
  29.  *    port identifiers - they are only used for the thread_get_special_port
  30.  *    and thread_set_special_port routines.
  31.  *    
  32.  */
  33.  
  34. #ifndef    _MACH_THREAD_SPECIAL_PORTS_H_
  35. #define _MACH_THREAD_SPECIAL_PORTS_H_
  36.  
  37. #define THREAD_KERNEL_PORT    1    /* Represents the thread to the outside
  38.                        world.*/
  39. #define THREAD_REPLY_PORT    2    /* Default reply port for the thread's
  40.                        use. */
  41. #define THREAD_EXCEPTION_PORT    3    /* Exception messages for the thread
  42.                        are sent to this port. */
  43.  
  44. /*
  45.  *    Definitions for ease of use
  46.  */
  47.  
  48. #define thread_get_kernel_port(thread, port)    \
  49.         (thread_get_special_port((thread), THREAD_KERNEL_PORT, (port)))
  50.  
  51. #define thread_set_kernel_port(thread, port)    \
  52.         (thread_set_special_port((thread), THREAD_KERNEL_PORT, (port)))
  53.  
  54. #define thread_get_reply_port(thread, port)    \
  55.         (thread_get_special_port((thread), THREAD_REPLY_PORT, (port)))
  56.  
  57. #define thread_set_reply_port(thread, port)    \
  58.         (thread_set_special_port((thread), THREAD_REPLY_PORT, (port)))
  59.  
  60. #define thread_get_exception_port(thread, port)    \
  61.         (thread_get_special_port((thread), THREAD_EXCEPTION_PORT, (port)))
  62.  
  63. #define thread_set_exception_port(thread, port)    \
  64.         (thread_set_special_port((thread), THREAD_EXCEPTION_PORT, (port)))
  65.  
  66. #endif    _MACH_THREAD_SPECIAL_PORTS_H_
  67.